import request from '@/utils/request'

// sku列表，GET /admin/product/list/{page}/{limit}
export const reqgetSkuList = (page, limit) => request({
    url: `/admin/product/list/${page}/${limit}`,
    method: 'get'
})

// 下架， GET /admin/product/cancelSale/{skuId}
export const reqcancelSale = (skuId) => request({
    url: `/admin/product/cancelSale/${skuId}`,
    method: 'get'
})

// 上架, GET /admin/product/onSale/{skuId}
export const reqonSale = (skuId) => request({
    url: `/admin/product/onSale/${skuId}`,
    method: 'get'
})

// 获取SKU详情，GET /admin/product/getSkuById/{skuId}
export const reqgetSkuById = (skuId) => request({
    url: `/admin/product/getSkuById/${skuId}`,
    method: 'get'
})

// 删除SKU，/admin/product/deleteSku/{skuId}， delete
export const reqdeleteSku = (skuId) => request({
    url: `/admin/product/deleteSku/${skuId}`,
    method: 'delete'
})
